<!--群聊天信息页面-->
<template>
    <div class="chatInfoGroup">
        <Head title="聊天信息" BackType2="1" BackType2Num="132"></Head>
        <!--头部用户头像区域-->
        <div class="usersContainer">
            <div class="user" @click="bindToPersoanInfo" v-for="item in userGroup">
                <img src="../assets/img/messageAvatar.png" class="avatar">
                <p class="name">小林同学</p>
            </div>

            <div class="add" @click="bindToAddM">
                <img src="../assets/img/addIcon.png">
            </div>
            <div class="add" @click="bindToCutM">
                <img src="../assets/img/cutIcon.png">
            </div>

        </div>

        <p class="more" @click="seeMore">
            <span>查看更多群成员</span>
            <img src="../assets/img/arrowIcon.png">
        </p>

        <div class="boundaryLarge"></div>

        <div class="colJump" @click="bindToGroupName">
            <div class="l">
                <p>群聊名称</p>
            </div>
            <div class="r">
                <span>工作群</span>
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <div class="colJump" @click="bindToGroupMyName">
            <div class="l">
                <p>我在本群的昵称</p>
            </div>
            <div class="r">
                <span>水兵月</span>
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <div class="colJump" @click="bindToGroupAnnouncement">
            <div class="l">
                <p>群公告</p>
            </div>
            <div class="r">
                <span>未设置</span>
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <div class="colJump" @click="bindToGroupManagement">
            <div class="l">
                <p>群管理</p>
            </div>
            <div class="r">
                <span>未设置</span>
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <div class="boundaryVeryLarge"></div>

        <!--置顶聊天-->
        <div class="colSwitch">
            <div class="l">
                <p>置顶聊天</p>
            </div>
            <div class="r">
                <van-switch
                    v-model="stickChecked"
                    size="28px"
                />
            </div>
        </div>

        <div class="colSwitch">
            <div class="l">
                <p>保存到通讯录</p>
            </div>
            <div class="r">
                <van-switch
                    v-model="addressBook"
                    size="28px"
                />
            </div>
        </div>

        <div class="boundaryLarge"></div>

        <div class="colJump" @click="bindToFindChatContent">
            <div class="l">
                <p>查找聊天记录</p>
            </div>
            <div class="r">
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <div class="boundaryLarge"></div>

        <!--阅后即焚-->
        <div class="burReading">
            <div class="l">
                <p class="top">阅后即焚</p>
                <p class="bot"><span>*</span>当退出对话时，对话中的所有消息会自动销毁</p>
            </div>
            <div class="r">
                <van-switch
                    v-model="burReading"
                    size="28px"
                />
            </div>
        </div>

        <!--投诉-->
        <div class="colJump">
            <div class="l">
                <p>投诉</p>
            </div>
            <div class="r">
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>

        <!--设置当前聊天背景-->
        <div class="colJump">
            <div class="l">
                <p>设置当前聊天背景</p>
            </div>
            <div class="r">
                <img src="../assets/img/arrowIcon.png">
            </div>
        </div>


        <div class="boundaryLarge"></div>

        <div class="boundaryLarge"></div>

        <!--清空聊天记录-->
        <div class="warning">
            清空聊天记录
        </div>

        <!--删除并退出-->
        <div class="warning">
            删除并退出
        </div>

        <div class="boundaryLarge"></div>

    </div>
</template>

<script>
    import Head from "../components/Head";
    import {Switch} from 'vant';


    export default {
        data() {
            return {
                stickChecked: false,
                burReading: false,
                addressBook: false,
                userGroup: [
                    {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }, {
                        name: "小林同学"
                    }

                ]
            }
        },
        components: {
            Head,
            [Switch.name]: Switch
        },
        methods: {
            bindToAddM() {
                this.$router.push("/addmembers")
            },
            bindToFindChatCont() {
                this.$router.push("/findchatcontent")
            },
            bindToPersoanInfo() {
                this.$router.push("/NewFriendInfo")
            },
            bindToCutM() {
                this.$router.push("/addmembers?cut=true")
            },
            bindToGroupName(){
              this.$router.push("/groupname")
            },
            bindToGroupMyName(){
              this.$router.push("/groupmyname")
            },
            bindToGroupAnnouncement(){
              this.$router.push("/groupannouncement")
            },
            bindToGroupManagement(){
              this.$router.push("/groupmanagement")
            },
            bindToFindChatContent(){
                this.$router.push("/findchatcontent")
            },
            seeMore(){
                console.log("查看更多");
            },

        }
    }

</script>

<style scoped lang="less">
    .chatInfoGroup {
        position: absolute;
        width: 100%;
        top: 88px;
        bottom: 0;
        background-color: #f1f5f8;

        /*头部用户头像区域*/

        .usersContainer {
            display: flex;
            flex-wrap: wrap;
            width: 100%;
            padding: 30px 45px 0 5px;
            box-sizing: border-box;
            background-color: #fff;

            .user {
                width: 100px;
                display: flex;
                flex-direction: column;
                margin-bottom: 30px;
                margin-left: 40px;

                .avatar {
                    width: 100px;
                    height: 100px;
                    border-radius: 10px;
                }

                p {
                    width: 100px;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    font-size: 24px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(68, 68, 68, 1);
                    margin-top: 15px;
                }
            }

            .add {
                margin-left: 40px;

                img {
                    width: 100px;
                    height: 100px;
                }
            }
        }

        .more {
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: #ffffff;
            padding-bottom: 40px;
            box-sizing: border-box;

            span {
                font-size: 32px;
                font-family: PingFangSC-Regular;
                font-weight: 400;
                color: rgba(136, 136, 136, 1);
            }

            img {
                width: 14px;
                height: 22px;
            }
        }

        .boundary {
            width: 100%;
            height: 10px;
            background-color: #f1f5f8;
        }

        .boundaryVeryLarge {
            width: 100%;
            height: 40px;
            background-color: #f1f5f8;
        }

        .colJump {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 90px;
            background-color: #fff;
            padding: 0 34px 0 36px;
            box-sizing: border-box;
            border-bottom: 1px solid #E5E5E5;

            .l {
                p {
                    font-size: 32px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(50, 50, 50, 1);
                }
            }

            .r {
                display: flex;
                align-items: center;

                img {
                    width: 14px;
                    height: 22px;
                    margin-left: 20px;
                }

                span {
                    font-size: 34px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(136, 136, 136, 1);
                }
            }
        }

        .colSwitch {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 90px;
            background-color: #fff;
            padding: 0 34px 0 36px;
            box-sizing: border-box;
            border-bottom: 1px solid #E5E5E5;

            .l {
                p {
                    font-size: 32px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(50, 50, 50, 1);
                }
            }

            .r {

            }
        }

        .burReading {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 130px;
            padding: 0 34px 0 36px;
            box-sizing: border-box;
            background-color: #fff;
            border-bottom: 1px solid #E5E5E5;


            .l {
                .top {
                    font-size: 32px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(50, 50, 50, 1);
                }

                .bot {
                    font-size: 22px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: #8C8C8C;
                    margin-top: 16px;

                    span {
                        color: rgba(246, 18, 18, 1);
                        vertical-align: middle;
                    }
                }
            }
        }

        .boundaryLarge {
            height: 20px;
            background-color: #f1f5f8;
        }

        .warning {
            width: 100%;
            height: 87px;
            text-align: center;
            line-height: 87px;
            font-size:34px;
            font-family:PingFangSC-Regular;
            font-weight:400;
            color:rgba(233,103,103,1);
            background-color: #ffffff;
            border-bottom: 1px solid #E5E5E5;
        }

    }
</style>

